using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace comm.objst
{
    [Serializable]
    public class TableItem : TableRow, ICodeReplace
    {
#region 2013-1-4 19:16:52
public const string KEY_ITEM_ID="ItemId";
public const string PLAYER_ID="PlayerId";
public const string DITEM_ID="DItemId";
public const string COMPUTING_EXPR_DIC="ComputingExprDic";
public const string QUALITY_TYPE="QualityType";
public const string UPGRADE="Upgrade";
public const string SOLT_COUNT="SoltCount";
public const string SOLT_LIST="SoltList";
public const string ITEM_COUNT="ItemCount";
public const string IS_BIND="IsBind";
public const string ROW_STATE_TYPE="RowStateType";
public const string ROW_CREATE_TIME="RowCreateTime";
public const string ROW_DELETE_TIME="RowDeleteTime";
public const string BIG_TEXT_ROW_LOG="RowLog";

#endregion
public comm.CodeFill FillRegion()
        {
            return new CodeFill(CodeFillType.ORM_CONST, this);
        }

        private string _itemId = null;
        [OrmAttr(true)]
        public string ItemId
        {
            get
            {
                if (_itemId == null)
                {
                    _itemId = comm.GUID.NewString();
                }
                return _itemId;
            }
            set { _itemId = value; }
        }

        private string _playerId = null;
        public string PlayerId
        {
            get
            {
                if (_playerId == null)
                {
                    _playerId = "";
                }
                return _playerId;
            }
            set { _playerId = value; }
        }

        private string _dItemId = null;
        public string DItemId
        {
            get
            {
                if (_dItemId == null)
                {
                    _dItemId = "";
                }
                return _dItemId;
            }
            set { _dItemId = value; }
        }

        private Dictionary<string, string> _computingExprDic = null;
        public Dictionary<string, string> ComputingExprDic
        {
            get
            {
                if (_computingExprDic == null)
                {
                    _computingExprDic = new Dictionary<string, string>();
                }
                return _computingExprDic;
            }
            set { _computingExprDic = value; }
        }

        public ItemQualityType QualityType { get; set; }
        public int Upgrade { get; set; }
        public int SoltCount { get; set; }

        private List<string> _soltList = null;
        public List<string> SoltList
        {
            get
            {
                if (_soltList == null)
                {
                    _soltList = new List<string>();
                }
                return _soltList;
            }
            set { _soltList = value; }
        }

        private int _itemCount = 1;
        public int ItemCount
        {
            get { return _itemCount; }
            set { _itemCount = value; }
        }

        public bool IsBind { get; set; }
    }
}
